home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / fontutil.6 / fontutil / fontutils-0.6 / configure < prev    next >
Encoding:
Text File  |  1992-10-15  |  16.6 KB  |  730 lines

  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf.
  4. # Copyright (C) 1991, 1992 Free Software Foundation, Inc.
  5.  
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10.  
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create]
  21. #        [--prefix=PREFIX] [--exec_prefix=PREFIX] [--with-PROGRAM] [TARGET]
  22. # Ignores all args except --srcdir, --prefix, --exec_prefix, and --no-create.
  23.  
  24. trap 'rm -f conftest* core; exit 1' 1 3 15
  25.  
  26. for arg
  27. do
  28.   # Handle --exec_prefix with a space before the argument.
  29.   if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
  30.   # Handle --host with a space before the argument.
  31.   elif test x$next_host = xyes; then next_host=
  32.   # Handle --prefix with a space before the argument.
  33.   elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
  34.   # Handle --srcdir with a space before the argument.
  35.   elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
  36.   else
  37.     case $arg in
  38.      -exec_prefix=* | --exec_prefix=* | --exec_prefi=* | --exec_pref=* | --exec_pre=* | --exec_pr=* | --exec_p=* | --exec_=* | --exec=* | --exe=* | --ex=* | --e=*)
  39.     exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  40.      -exec_prefix | --exec_prefix | --exec_prefi | --exec_pref | --exec_pre | --exec_pr | --exec_p | --exec_ | --exec | --exe | --ex | --e)
  41.     next_exec_prefix=yes ;;
  42.  
  43.      -gas | --gas | --ga | --g) ;;
  44.  
  45.      -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
  46.      -host | --host | --hos | --ho | --h)
  47.     next_host=yes ;;
  48.  
  49.      -nfp | --nfp | --nf) ;;
  50.  
  51.      -no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no)
  52.         no_create=1 ;;
  53.  
  54.      -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  55.     prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  56.      -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  57.     next_prefix=yes ;;
  58.  
  59.      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
  60.     srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  61.      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
  62.     next_srcdir=yes ;;
  63.  
  64.      -with-* | --with-*) ;;
  65.  
  66.      *) ;;
  67.     esac
  68.   fi
  69. done
  70.  
  71. rm -f conftest*
  72. compile='${CC-cc} $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
  73.  
  74. # A filename unique to this package, relative to the directory that
  75. # configure is in, which we can look for to find out if srcdir is correct.
  76. unique_file=limn/fit.c
  77.  
  78. # Find the source files, if location was not specified.
  79. if test -z "$srcdir"; then
  80.   srcdirdefaulted=yes
  81.   # Try the directory containing this script, then `..'.
  82.   prog=$0
  83.   confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
  84.   test "X$confdir" = "X$prog" && confdir=.
  85.   srcdir=$confdir
  86.   if test ! -r $srcdir/$unique_file; then
  87.     srcdir=..
  88.   fi
  89. fi
  90. if test ! -r $srcdir/$unique_file; then
  91.   if test x$srcdirdefaulted = xyes; then
  92.     echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
  93.   else
  94.     echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  95.   fi
  96.   exit 1
  97. fi
  98. # Preserve a srcdir of `.' to avoid automounter screwups with pwd.
  99. # But we can't avoid them for `..', to make subdirectories work.
  100. case $srcdir in
  101.   .|/*|~*) ;;
  102.   *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
  103. esac
  104.  
  105.  
  106.  
  107. compile='rm -f conftest.t;
  108.   mv conftest.c conftest.t;
  109.   echo "$DEFS" > conftest.c;
  110.   cat conftest.t >> conftest.c;
  111.   rm -f conftest.t;
  112.   ${CC-cc} conftest.c -o conftest $LIBS >/dev/null 2>&1'
  113.  
  114.  
  115. # We must have gcc.
  116. if test -z "$CC"; then
  117.   echo checking for gcc
  118.   saveifs="$IFS"; IFS="${IFS}:"
  119.   for dir in $PATH; do
  120.     test -z "$dir" && dir=.
  121.     if test -f $dir/gcc; then
  122.       CC="gcc"
  123.       break
  124.     fi
  125.   done
  126.   IFS="$saveifs"
  127. fi
  128. test -z "$CC" && CC="cc"
  129.  
  130. # Find out if we are using GNU C, under whatever name.
  131. cat <<EOF > conftest.c
  132. #ifdef __GNUC__
  133.   yes
  134. #endif
  135. EOF
  136. ${CC-cc} -E conftest.c > conftest.out 2>&1
  137. if egrep yes conftest.out >/dev/null 2>&1; then
  138.   GCC=1 # For later tests.
  139.   CC="$CC -O"
  140. fi
  141. rm -f conftest*
  142.  
  143. if test -n "$GCC"
  144. then :
  145. else
  146.   echo "Warning: these programs are written in GNU C,"
  147.   echo "so you need to have gcc."
  148. fi
  149. echo checking how to run the C preprocessor
  150. if test -z "$CPP"; then
  151.   CPP='${CC-cc} -E'
  152.   cat <<EOF > conftest.c
  153. $DEFS
  154. #include <stdio.h>
  155. EOF
  156. err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  157. if test -z "$err"; then
  158.   :
  159. else
  160.   CPP=/lib/cpp
  161. fi
  162. rm -f conftest*
  163. fi
  164.  
  165. if test -n "$GCC"; then
  166.   echo checking whether -traditional is needed
  167.   pattern="Autoconf.*'x'"
  168.   prog='#include <sgtty.h>
  169. Autoconf TIOCGETP'
  170.   cat <<EOF > conftest.c
  171. $DEFS
  172. $prog
  173. EOF
  174. eval "$CPP conftest.c > conftest.out 2>&1"
  175. if egrep "$pattern" conftest.out >/dev/null 2>&1; then
  176.   need_trad=1
  177. fi
  178. rm -f conftest*
  179.  
  180.  
  181.   if test -z "$need_trad"; then
  182.     prog='#include <termio.h>
  183. Autoconf TCGETA'
  184.     cat <<EOF > conftest.c
  185. $DEFS
  186. $prog
  187. EOF
  188. eval "$CPP conftest.c > conftest.out 2>&1"
  189. if egrep "$pattern" conftest.out >/dev/null 2>&1; then
  190.   need_trad=1
  191. fi
  192. rm -f conftest*
  193.  
  194.   fi
  195.   test -n "$need_trad" && CC="$CC -traditional"
  196. fi
  197.  
  198. # Make sure to not get the incompatible SysV /etc/install and
  199. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  200. # or the SunOS /usr/etc/install directory, or the AIX /bin/install.
  201. if test -z "$INSTALL"; then
  202.   echo checking for install
  203.   saveifs="$IFS"; IFS="${IFS}:"
  204.   for dir in $PATH; do
  205.     test -z "$dir" && dir=.
  206.     case $dir in
  207.     /etc|/usr/sbin|/usr/etc) ;;
  208.     *)
  209.       if test -f $dir/install; then
  210.     if grep dspmsg $dir/install >/dev/null 2>&1; then
  211.       : AIX
  212.     else
  213.       INSTALL="$dir/install -c"
  214.       INSTALL_PROGRAM='$(INSTALL)'
  215.       INSTALL_DATA='$(INSTALL) -m 644'
  216.       break
  217.     fi
  218.       fi
  219.       ;;
  220.     esac
  221.   done
  222.   IFS="$saveifs"
  223. fi
  224. INSTALL=${INSTALL-cp}
  225. INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
  226. INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
  227.  
  228. if test -z "$RANLIB"; then
  229.   echo checking for ranlib
  230.   saveifs="$IFS"; IFS="${IFS}:"
  231.   for dir in $PATH; do
  232.     test -z "$dir" && dir=.
  233.     if test -f $dir/ranlib; then
  234.       RANLIB="ranlib"
  235.       break
  236.     fi
  237.   done
  238.   IFS="$saveifs"
  239. fi
  240. test -z "$RANLIB" && RANLIB="@:"
  241.  
  242.  
  243. echo checking for AIX
  244. cat <<EOF > conftest.c
  245. $DEFS
  246. #ifdef _AIX
  247.   yes
  248. #endif
  249.  
  250. EOF
  251. eval "$CPP conftest.c > conftest.out 2>&1"
  252. if egrep "yes" conftest.out >/dev/null 2>&1; then
  253.   DEFS="${DEFS}#define _ALL_SOURCE 1
  254. "
  255. fi
  256. rm -f conftest*
  257.  
  258.  
  259. echo checking for DYNIX/ptx libseq
  260. cat <<EOF > conftest.c
  261. $DEFS
  262. #if defined(_SEQUENT_)
  263.   yes
  264. #endif
  265.  
  266. EOF
  267. eval "$CPP conftest.c > conftest.out 2>&1"
  268. if egrep "yes" conftest.out >/dev/null 2>&1; then
  269.   SEQUENT=1
  270. fi
  271. rm -f conftest*
  272.  
  273. test -n "$SEQUENT" && test -f /usr/lib/libseq.a &&
  274.   LIBS="$LIBS -lseq"
  275.  
  276. echo checking for POSIXized ISC
  277. if test -d /etc/conf/kconfig.d &&
  278.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  279. then
  280.   ISC=1 # If later tests want to check for ISC.
  281.   DEFS="${DEFS}#define _POSIX_SOURCE 1
  282. "
  283.   if test -n "$GCC"; then
  284.     CC="$CC -posix"
  285.   else
  286.     CC="$CC -Xp"
  287.   fi
  288. fi
  289.  
  290. echo checking for ISC X window libraries
  291. if test -n "$ISC"
  292. then wlibs="$wlibs -lnsl_s -linet"
  293. fi
  294.  
  295. echo checking for minix/config.h
  296. cat <<EOF > conftest.c
  297. $DEFS
  298. #include <minix/config.h>
  299. EOF
  300. err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  301. if test -z "$err"; then
  302.   MINIX=1
  303. fi
  304. rm -f conftest*
  305.  
  306. # The Minix shell can't assign to the same variable on the same line!
  307. if test -n "$MINIX"; then
  308.   DEFS="${DEFS}#define _POSIX_SOURCE 1
  309. "
  310.   DEFS="${DEFS}#define _POSIX_1_SOURCE 2
  311. "
  312.   DEFS="${DEFS}#define _MINIX 1
  313. "
  314. fi
  315.  
  316. echo checking for directory library header
  317. echo checking for dirent.h
  318. cat <<EOF > conftest.c
  319. $DEFS
  320. #include <dirent.h>
  321. EOF
  322. err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  323. if test -z "$err"; then
  324.   DEFS="${DEFS}#define DIRENT 1
  325. " dirheader=dirent.h
  326. fi
  327. rm -f conftest*
  328.  
  329. if test -z "$dirheader"; then
  330. echo checking for sys/ndir.h
  331. cat <<EOF > conftest.c
  332. $DEFS
  333. #include <sys/ndir.h>
  334. EOF
  335. err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  336. if test -z "$err"; then
  337.   DEFS="${DEFS}#define SYSNDIR 1
  338. " dirheader=sys/ndir.h
  339. fi
  340. rm -f conftest*
  341.  
  342. fi
  343. if test -z "$dirheader"; then
  344. echo checking for sys/dir.h
  345. cat <<EOF > conftest.c
  346. $DEFS
  347. #include <sys/dir.h>
  348. EOF
  349. err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  350. if test -z "$err"; then
  351.   DEFS="${DEFS}#define SYSDIR 1
  352. " dirheader=sys/dir.h
  353. fi
  354. rm -f conftest*
  355.  
  356. fi
  357.  
  358. echo checking for closedir return value
  359. cat <<EOF > conftest.c
  360. #include <sys/types.h>
  361. #include <$dirheader>
  362. int closedir(); main() { exit(0); }
  363. EOF
  364. eval $compile
  365. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  366.   :
  367. else
  368.   DEFS="${DEFS}#define VOID_CLOSEDIR 1
  369. "
  370. fi
  371. rm -f conftest*
  372.  
  373. echo checking for Xenix
  374. cat <<EOF > conftest.c
  375. $DEFS
  376. #if defined(M_XENIX) && !defined(M_UNIX)
  377.   yes
  378. #endif
  379.  
  380. EOF
  381. eval "$CPP conftest.c > conftest.out 2>&1"
  382. if egrep "yes" conftest.out >/dev/null 2>&1; then
  383.   XENIX=1
  384. fi
  385. rm -f conftest*
  386.  
  387. if test -n "$XENIX"; then
  388.   DEFS="${DEFS}#define VOID_CLOSEDIR 1
  389. "
  390.   LIBS="$LIBS -lx"
  391.   case "$DEFS" in
  392.   *SYSNDIR*) ;;
  393.   *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
  394.   esac
  395. fi
  396.  
  397.  
  398. echo checking for directory library header
  399. echo checking for dirent.h
  400. cat <<EOF > conftest.c
  401. $DEFS
  402. #include <dirent.h>
  403. EOF
  404. err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  405. if test -z "$err"; then
  406.   DEFS="${DEFS}#define DIRENT 1
  407. " dirheader=dirent.h
  408. fi
  409. rm -f conftest*
  410.  
  411. if test -z "$dirheader"; then
  412. echo checking for sys/ndir.h
  413. cat <<EOF > conftest.c
  414. $DEFS
  415. #include <sys/ndir.h>
  416. EOF
  417. err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  418. if test -z "$err"; then
  419.   DEFS="${DEFS}#define SYSNDIR 1
  420. " dirheader=sys/ndir.h
  421. fi
  422. rm -f conftest*
  423.  
  424. fi
  425. if test -z "$dirheader"; then
  426. echo checking for sys/dir.h
  427. cat <<EOF > conftest.c
  428. $DEFS
  429. #include <sys/dir.h>
  430. EOF
  431. err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  432. if test -z "$err"; then
  433.   DEFS="${DEFS}#define SYSDIR 1
  434. " dirheader=sys/dir.h
  435. fi
  436. rm -f conftest*
  437.  
  438. fi
  439.  
  440. echo checking for closedir return value
  441. cat <<EOF > conftest.c
  442. #include <sys/types.h>
  443. #include <$dirheader>
  444. int closedir(); main() { exit(0); }
  445. EOF
  446. eval $compile
  447. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  448.   :
  449. else
  450.   DEFS="${DEFS}#define VOID_CLOSEDIR 1
  451. "
  452. fi
  453. rm -f conftest*
  454.  
  455. echo checking for limits.h
  456. cat <<EOF > conftest.c
  457. $DEFS
  458. #include <limits.h>
  459. EOF
  460. err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  461. if test -z "$err"; then
  462.   :
  463. else
  464.   DEFS="${DEFS}#define LIMITS_H_MISSING 1
  465. "
  466. fi
  467. rm -f conftest*
  468.  
  469. echo checking for float.h
  470. cat <<EOF > conftest.c
  471. $DEFS
  472. #include <float.h>
  473. EOF
  474. err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  475. if test -z "$err"; then
  476.   :
  477. else
  478.   DEFS="${DEFS}#define FLOAT_H_MISSING 1
  479. "
  480. fi
  481. rm -f conftest*
  482.  
  483. echo checking whether string.h declares mem functions
  484. echo "${DEFS}#include <string.h>" > conftest.c
  485. eval "$CPP conftest.c > conftest.out 2>&1"
  486. if egrep "memchr" conftest.out >/dev/null 2>&1; then
  487.   :
  488. else 
  489.   echo checking for memory.h
  490. cat <<EOF > conftest.c
  491. $DEFS
  492. #include <memory.h>
  493. EOF
  494. err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  495. if test -z "$err"; then
  496.   DEFS="${DEFS}#define NEED_MEMORY_H 1
  497. "
  498. fi
  499. rm -f conftest*
  500.  
  501. fi
  502. rm -f conftest*
  503.  
  504.  
  505. echo checking for ANSI C header files
  506. cat <<EOF > conftest.c
  507. $DEFS
  508. #include <stdlib.h>
  509. #include <stdarg.h>
  510. #include <string.h>
  511. #include <float.h>
  512. #include <limits.h>
  513. EOF
  514. err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  515. if test -z "$err"; then
  516.   DEFS="${DEFS}#define STDC_HEADERS 1
  517. "
  518. fi
  519. rm -f conftest*
  520.  
  521. echo checking for unistd.h
  522. cat <<EOF > conftest.c
  523. $DEFS
  524. #include <unistd.h>
  525. EOF
  526. err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  527. if test -z "$err"; then
  528.   DEFS="${DEFS}#define HAVE_UNISTD_H 1
  529. "
  530. fi
  531. rm -f conftest*
  532.  
  533. echo checking for BSD string and memory functions
  534. echo "#include <strings.h>
  535. main() { exit(0); } t() { rindex(0, 0); bzero(0, 0); }" > conftest.c
  536. if eval $compile; then
  537.   :
  538. else
  539.   DEFS="${DEFS}#define USG 1
  540. "
  541. fi
  542. rm -f conftest*
  543.  
  544.  
  545. echo checking for X11 headers and libraries
  546. dir=""
  547. cat <<EOF > conftest.c
  548. $DEFS
  549. #include <X11/Xaw/Box.h>
  550. EOF
  551. err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  552. if test -z "$err"; then
  553.   :
  554. else
  555.   if test -r /usr/local/include/X11/Xaw/Box.h
  556.   then dir=/usr/local/include
  557.   elif test -r /usr/lpp/X11/Xamples/include/Box.h
  558.   then dir=/usr/lpp/X11/Xamples/include
  559.   elif test -r /usr/include/X11R4/Xaw/Box.h
  560.   then dir=/usr/include/X11R4
  561.   elif test -r /usr/include/X11R5/Xaw/Box.h
  562.   then dir=/usr/include/X11R5
  563.   elif test -r /usr/X11/include/Box.h
  564.   then dir=/usr/X11/include
  565.   elif test -r /usr/X11R5/include/Box.h
  566.   then dir=/usr/X11R5/include
  567.   fi
  568.  
  569. fi
  570. rm -f conftest*
  571. if test -n "$dir"
  572. then xincludedir=-I$dir
  573.      
  574. fi
  575. # Now check for the libraries.  Amazing how every single X vendor puts
  576. # these in a different place, and all because MIT thought they should go
  577. # in /usr/lib.
  578. dir1=""
  579. if test -r /usr/local/lib/libXaw.a
  580. then dir1=/usr/local/lib
  581. elif test -r /usr/lpp/X11/Xamples/lib/Xaw/libXaw.a
  582. then dir1=/usr/lpp/X11/Xamples/lib/Xaw
  583. elif test -r /usr/lib/X11R4/libX11.sl
  584. then dir1=/usr/lib/X11R4
  585. elif test -r /usr/X11/lib/libXaw.a
  586. then dir1=/usr/X11/lib
  587. elif test -r /usr/X11R5/lib/libXaw.a
  588. then dir1=/usr/X11R5/lib
  589. fi
  590. dir2=""
  591. if test -r /usr/lpp/X11/Xamples/lib/Xmu/libXmu.a
  592. then dir2=/usr/lpp/X11/Xamples/lib/Xmu
  593. fi
  594. test -n "$dir1" && xlibdir=-L$dir1
  595. test -n "$dir2" && xlibdir="$xlibdir -L$dir2"
  596.  
  597. if test -z "$prefix"
  598. then
  599.   echo checking for gcc to derive installation directory prefix
  600.   saveifs="$IFS"; IFS="$IFS:"
  601.   for dir in $PATH; do
  602.     test -z "$dir" && dir=.
  603.     if test $dir != . && test -f $dir/gcc; then
  604.       # Not all systems have dirname.
  605.       prefix=`echo $dir|sed 's%/[^/][^/]*$%%'`
  606.       break
  607.     fi
  608.   done
  609.   IFS="$saveifs"
  610. fi
  611.  
  612.  
  613. # This will generate `Makefile'(s), `config.status', and our header file.
  614. if test -n "$prefix"; then
  615.   test -z "$exec_prefix" && exec_prefix='$(prefix)'
  616.   prsub="s%^prefix[     ]*=.*$%prefix = $prefix%"
  617. fi
  618. if test -n "$exec_prefix"; then
  619.   prsub="$prsub
  620. s%^exec_prefix[     ]*=.*$%exec_prefix = $exec_prefix%"
  621. fi
  622.  
  623. trap 'rm -f config.status; exit 1' 1 3 15
  624. echo creating config.status
  625. rm -f config.status
  626. cat <<EOF > config.status
  627. #!/bin/sh
  628. # Generated automatically by configure.
  629. # Run this file to recreate the current configuration.
  630. # This directory was configured as follows,
  631. # on host `(hostname || uname -n) 2>/dev/null`:
  632. #
  633. # $0 $*
  634.  
  635. case "\$1" in
  636.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  637.   exec /bin/sh $0 $* ;;
  638. esac
  639.  
  640. trap 'rm -f ./GNUmakefile doc/Makefile include/c-auto.h; exit 1' 1 3 15
  641. CC='$CC'
  642. CPP='$CPP'
  643. INSTALL='$INSTALL'
  644. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  645. INSTALL_DATA='$INSTALL_DATA'
  646. RANLIB='$RANLIB'
  647. wlibs='$wlibs'
  648. xincludedir='$xincludedir'
  649. xlibdir='$xlibdir'
  650. LIBS='$LIBS'
  651. srcdir='$srcdir'
  652. DEFS='$DEFS'
  653. prefix='$prefix'
  654. exec_prefix='$exec_prefix'
  655. prsub='$prsub'
  656. EOF
  657. cat <<\EOF >> config.status
  658.  
  659. top_srcdir=$srcdir
  660. for file in ./GNUmakefile doc/Makefile; do
  661.   srcdir=$top_srcdir
  662.   # Remove last slash and all that follows it.  Not all systems have dirname.
  663.   dir=`echo $file|sed 's%/[^/][^/]*$%%'`
  664.   if test "$dir" != "$file"; then
  665.     test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
  666.     test ! -d $dir && mkdir $dir
  667.   fi
  668.   echo creating $file
  669.   rm -f $file
  670.   echo "# Generated automatically from `basename $file`.in by configure." > $file
  671.   sed -e "
  672. $prsub
  673. s%@CC@%$CC%g
  674. s%@CPP@%$CPP%g
  675. s%@INSTALL@%$INSTALL%g
  676. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  677. s%@INSTALL_DATA@%$INSTALL_DATA%g
  678. s%@RANLIB@%$RANLIB%g
  679. s%@wlibs@%$wlibs%g
  680. s%@xincludedir@%$xincludedir%g
  681. s%@xlibdir@%$xlibdir%g
  682. s%@LIBS@%$LIBS%g
  683. s%@srcdir@%$srcdir%g
  684. " $top_srcdir/${file}.in >> $file
  685. done
  686.  
  687. echo creating include/c-auto.h
  688. # Ultrix awk loses trailing comments from the header file, but
  689. # that's not fatal.
  690. rm -f conftest.h
  691. echo "/* include/c-auto.h.  Generated automatically by configure.  */" > conftest.h
  692. echo "$DEFS
  693. /* END_OF_DEFS */" |
  694. awk '
  695. # The escaped newlines are to work around a bug in GNU m4 0.99
  696. # in quoting more than 2 arguments in a single line.
  697. BEGIN { filenum = 1 }
  698. filenum == 1 && $1 == "#define" \
  699. { defs[$2] = $3
  700.   defined[$2] = 1
  701.   for (i = 4; i <= NF; i++)
  702.     defs[$2] = defs[$2] " " $i
  703. }
  704. /END_OF_DEFS/ { filenum = 2; next }
  705. filenum == 2 && $1 == "#define" && \
  706. defined[$2] == 1 {
  707.   $3 = defs[$2]
  708.   print; next
  709. }
  710. filenum == 2 && $1 == "#undef" && \
  711. defined[$2] == 1 {
  712.   $1 = "#define"
  713.   $2 = $2 " " defs[$2]
  714.   print; next
  715. }
  716. filenum == 2 { print }
  717. ' - $top_srcdir/include/c-auto.h.in >> conftest.h
  718. if cmp -s include/c-auto.h conftest.h 2>/dev/null; then
  719.   # The file exists and we would not be changing it.
  720.   rm -f conftest.h
  721. else
  722.   rm -f include/c-auto.h
  723.   mv conftest.h include/c-auto.h
  724. fi
  725.  
  726. EOF
  727. chmod +x config.status
  728. test -n "$no_create" || ./config.status
  729.  
  730.